<!DOCTYPE html>
<html th:replace="layout/layout"
      xmlns:th="http://www.thymeleaf.org">
<title th:fragment="titleName">统计分析</title>
<style th:fragment="styles">
</style>
<div id="customModule" th:fragment="content">
    <div class="row wrapper border-bottom white-bg page-heading">
        <div class="col-lg-10">
            <h2>统计分析</h2>
            <ol class="breadcrumb">
                <li>
                    <a href="/index?menuId=1">首页</a>
                </li>
                <li class="active">
                    <strong>统计分析</strong>
                </li>
            </ol>
        </div>
        <div class="col-lg-2">

        </div>
    </div>
    <div class="wrapper wrapper-content  animated fadeInRight">
        <div class="row">
            <div class="col-lg-2">
                <div class="form-group">
                    <select :disabled="authCity" v-model="city"  class="form-control" placeholder="城市编码"  @change="loadDistricts()">
                        <option :value="item.city_id" v-for="(item,index) in cityList">
                            {{item.city_name}}
                        </option>
                    </select>
                </div>
            </div>
            <div class="col-lg-2">
                <div class="form-group">
                    <select :disabled="authDistrict"  v-model="district"  class="form-control" placeholder="区县编码" @change="loadTowns()">
                        <option :value="item.district_id" v-for="(item,index) in districtList">
                            {{item.district_name}}
                        </option>
                    </select>
                </div>
            </div>
            <div class="col-lg-2">
                <div class="form-group">
                    <select :disabled="authTown"  v-model="town" class="form-control" placeholder="乡镇编码">
                        <option :value="0">
                            全部
                        </option>
                        <option :value="item.town_id" v-for="(item,index) in townList">
                            {{item.town__name}}
                        </option>
                    </select>
                </div>
            </div>
            <div class="col-lg-2">
                <button @click="showCharts()" class="btn btn-primary" id="search"><i
                        class="fa fa-search"></i>&nbsp;统计</button>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-6">
                <div class="panel panel-info">
                    <div class="panel-heading">
                        <h3 class="panel-title">养殖企业分布</h3>
                    </div>
                    <div class="panel-body">
                        <div id="breedEntDis" style="height: 360px;">

                        </div>
                    </div>
                </div>
            </div>
            <div class="col-lg-6">
                <div class="panel panel-info">
                    <div class="panel-heading">
                        <h3 class="panel-title">屠宰企业分布</h3>
                    </div>
                    <div class="panel-body" >
                        <div id="slEntDis" style="height: 360px;">

                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-6">
                <div class="panel panel-info">
                    <div class="panel-heading">
                        <h3 class="panel-title">饲养动物情况</h3>
                    </div>
                    <div class="panel-body">
                        <div id="animal" style="height: 360px;">

                        </div>
                    </div>
                </div>
            </div>
            <div class="col-lg-6">
                <div class="panel panel-info">
                    <div class="panel-heading">
                        <h3 class="panel-title">猪牛羊存栏数</h3>
                    </div>
                    <div class="panel-body">
                        <div id="stockPig" style="height: 360px;">

                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-6">
                <div class="panel panel-info">
                    <div class="panel-heading">
                        <h3 class="panel-title">其他饲养动物存栏数</h3>
                    </div>
                    <div class="panel-body">
                        <div id="stockOther" style="height: 360px;">

                        </div>
                    </div>
                </div>
            </div>
            <div class="col-lg-6">
                <div class="panel panel-info">
                    <div class="panel-heading">
                        <h3 class="panel-title">检疫申报情况</h3>
                    </div>
                    <div class="panel-body">
                        <div id="quarantine" style="height: 360px;">

                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-6">
                <div class="panel panel-info">
                    <div class="panel-heading">
                        <h3 class="panel-title">死淘记录</h3>
                    </div>
                    <div class="panel-body">
                        <div id="dead" style="height: 360px;">

                        </div>
                    </div>
                </div>
            </div>
            <div class="col-lg-6">
                <div class="panel panel-info">
                    <div class="panel-heading">
                        <h3 class="panel-title">屠宰企业日屠宰量</h3>
                    </div>
                    <div class="panel-body">
                        <div id="slaughter" style="height: 360px;">

                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-6">
                <div class="panel panel-info">
                    <div class="panel-heading">
                        <span class="panel-title">生产记录</span>
                        <select class="form-control pull-right" v-model="productionAnimalType" style="width: 120px;margin-top: -8px;color: #000000" @change="showProductionChart">
                            <option :value="item" v-for="(item,index) in animalTypes">
                                {{item}}
                            </option>
                        </select>
                    </div>
                    <div class="panel-body">
                        <div id="production" style="height: 360px;">

                        </div>
                    </div>
                </div>
            </div>
            <div class="col-lg-6">
                <div class="panel panel-info">
                    <div class="panel-heading">
                        <span class="panel-title">无害化记录</span>
                        <select class="form-control pull-right" v-model="harmlessAnimalType" style="width: 120px;margin-top: -8px;color: #000000" @change="showHarmlessChart">
                            <option :value="item" v-for="(item,index) in animalTypes">
                                {{item}}
                            </option>
                        </select>
                    </div>
                    <div class="panel-body">
                        <div id="harmless" style="height: 360px;">

                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-info">
                    <div class="panel-heading">
                        <span class="panel-title">检疫申报数量</span>
                        <select class="form-control pull-right" v-model="quarantineAnimalType" style="width: 120px;margin-top: -8px;color: #000000" @change="showHQuarantineBarChart">
                            <option value="0">
                                全部
                            </option>
                            <option :value="item" v-for="(item,index) in animalTypes">
                                {{item}}
                            </option>
                        </select>
                    </div>
                    <div class="panel-body">
                        <div id="quarantineBar" style="height: 360px;">

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:fragment="scriptRef">
    <script th:src="@{/static/js/lib/echarts.min.js}"></script>
    <script th:src="@{/js/stat/stat.js}"></script>
</div>

<script th:fragment="scripts" type="text/javascript">
    Stat.init();
    $('.i-checks').iCheck({
        checkboxClass: 'icheckbox_square-green',
        radioClass: 'iradio_square-green',
    });
</script>
</html>
